import React from 'react';
import ReactDOM from 'react-dom';
import Model from './components/model'
class App extends React.Component {
    state = {
      isShow:false
    }
    show = ()=>{
      this.setState({
        isShow:true
      })
    }
    close = ()=>{
      this.setState({
        isShow:false
      })
    }
    render() {
        let { isShow } = this.state;
        return <div className=''>
            <button onClick={this.show}>显示</button>
            <Model isShow = {isShow} onClose={this.close}>
              <h1 qqq='header'>这是我的自己定义的头部</h1>
              <h4 qqq='footer'>自己的尾部</h4>
              <h1 qqq='header'>22</h1>
              <div qqq='body'>
                这是我自己的身体，
                <h2>哈哈哈</h2>
              </div>
            </Model>
        </div>;
    }
}

ReactDOM.render(<App/>,document.getElementById('root'))